#include "ros/ros.h"
#include "demo_01/person.h"

int main(int argc,char *argv[])
{
    ros::init(argc,argv,"zhangsan");
    ros::NodeHandle nh;
    ros::Publisher pub=nh.advertise<demo_01::person>("fang",10);
    demo_01::person msg;
    msg.age=10;
    msg.name="wei";
    msg.height=1.78;

    ros::Rate r(1);

        while(ros::ok())
    {
        
        pub.publish(msg);
        ROS_INFO("the data is:");
        msg.age++;
        r.sleep();
        ros::spinOnce();
    }

    return 0;
}
